<template>
  <div class="easyd-weixin-Box">
    <div class="theMonthAddUserBox">
      <mt-loadmore
        :top-method="loadTop"
        :bottom-method="loadBottom"
        :bottom-all-loaded="allLoaded"
        ref="loadmore"
      >
        <div class="theMonthAddUserItem" v-for="i in 10">
          <div class="theMonthAddUserHeader">
            <img :src="imageDemoUrl" v-lazy="imageDemoUrl" v-gallery>
          </div>
          <div class="theMonthAddUserName">张三的梦</div>
          <div class="theMonthAddUserTime">新增时间：2012年1月10日 10:10</div>
        </div>
      </mt-loadmore>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      allLoaded: false,
      imageDemoUrl:
        "http://testfileupload.oss-cn-beijing.aliyuncs.com/header_test.png"
    };
  },
  methods: {
    loadTop() {
      setTimeout(() => {
        this.$refs.loadmore.onTopLoaded();
      }, 2000);
    },
    loadBottom() {
      setTimeout(() => {
        this.allLoaded = true;
        this.$refs.loadmore.onBottomLoaded();
      }, 5000);
    }
  }
};
</script>

<style lang="stylus" scoped>
@import '~PUBLIC_CSS'
.theMonthAddUserBox {
  width: 100%;
  height: 100%;
  padding-left: 15px;
  padding-right: 15px;
  box-sizing: border-box;
  padding-top: 15px;
}

.theMonthAddUserItem {
  width: 100%;
  height: 70px;
  margin-bottom: 15px;
  border-radius: 5px;
  box-sizing: border-box;
  position relative
  $itemStyle()

  .theMonthAddUserHeader {
    width: 50px;
    height: 50px;
    margin: 10px;
    float: left;

    img {
      width: 100%;
      height: 100%;
      border-radius: 5px;
      border: 1px solid #ddd;
      object-fit: cover;
    }
  }

  .theMonthAddUserName {
    float: left;
    width auto
    height: 50px;
    line-height:50px;
  }

  .theMonthAddUserTime {
      float: left;
      position absolute
      left 70px
      bottom 10px
  }
}
</style>

